<template>
    <div>
        <center>
            <h2>EmitChild</h2>
            <button @click="emitDataToParent">
                子向父发射事件并且传递数据
            </button>
        </center>
    </div>
</template>

<script>
export default {
    methods: {
        emitDataToParent() {
            this.$emit('emitDataToParent', '自定义事件参数，字符串', {
                title: 'emit传递',
            });
        },
    },
};
</script>

<style></style>
